

import classNames from 'classnames';
import styles from './index.less'
interface TeacherItemProps {
  className?: string;
  data?: any
}
export const TeacherItem: React.FC<TeacherItemProps> = ({
  className,
  data,
}) => {
  const type = Math.random() * 10 < 5 ? 1 : 2
  return <div className={classNames(styles.item, styles[`type${type}`], className)}>
    <div className={styles.ratio}>
      <div className={styles.content}>
        <div className={styles.person} style={{ backgroundImage: `url(${data?.photo})` }} />
        <div className={styles.mask}>
          <div className={styles.en}>Special effects Engineer</div>
          <div className={styles.cn}>{data?.name || data?.username}  <i className={styles.go} /></div>
        </div>
      </div>
    </div>
  </div>
}
